package cn.ywsj.ywsjmidtier.controller;

import cn.ywsj.ywsjmidtier.entity.VO.OftenBuyProductQueryVo;
import cn.ywsj.ywsjmidtier.service.WechatOftenBuyProductFeign;
import cn.ywsj.ywsjmidtier.utils.JsonObjectUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "常购商品")
@RestController
@RequestMapping("/wechat/member/oftenbuyproductmgr")
public class WechatOftenBuyProductController {
    @Autowired
    private WechatOftenBuyProductFeign wechatOftenBuyProductFeign;

    /**
     * 常购清单
     * @param oftenBuyProductQueryVo
     * @param start
     * @param pageSize
     * @return
     */
    @ApiOperation("常购清单")
    @PostMapping("/oftenbuyproductlist")
    public String oftenbuyproductlist(OftenBuyProductQueryVo oftenBuyProductQueryVo,Integer start,Integer pageSize){
       return wechatOftenBuyProductFeign.oftenbuyproductlist(JsonObjectUtil.ObjectToJson(oftenBuyProductQueryVo),start,pageSize);
    }
}
